home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-10-17 | 5.1 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Mon Oct 17 15:05:19 1994, modified Mon Oct 17 15:05:19 1994, creator 'MMCC', type ASCII, 4585 bytes "TestAssign.c" , at 0x1269 462 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 54 65 73 74 41 73 | 73 69 67 6e 2e 63 00 00 |..TestAs|sign.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 11 e9 00 | 00 01 ce aa c8 7b 6f aa |........|.....{o.|
|00000060| c8 7b 6f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.{o.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 74 b5 00 00 |........|....t...|
|00000080| 2f 2a 0d 54 65 73 74 41 | 73 73 69 67 6e 2e 63 0d |/*.TestA|ssign.c.|
|00000090| 0d 54 68 69 73 20 69 73 | 20 73 69 67 6e 69 66 69 |.This is| signifi|
|000000a0| 63 61 6e 74 6c 79 20 6d | 6f 72 65 20 63 6f 6d 70 |cantly m|ore comp|
|000000b0| 6c 69 63 61 74 65 64 20 | 74 68 61 6e 20 69 74 20 |licated |than it |
|000000c0| 6e 65 65 64 73 20 74 6f | 20 62 65 2e 20 54 68 65 |needs to| be. The|
|000000d0| 20 66 61 6e 63 79 20 73 | 74 75 66 66 0d 69 73 20 | fancy s|tuff.is |
|000000e0| 6d 65 72 65 6c 79 20 74 | 6f 20 70 75 74 20 41 73 |merely t|o put As|
|000000f0| 73 69 67 6e 2e 63 20 74 | 68 72 6f 75 67 68 20 69 |sign.c t|hrough i|
|00000100| 74 73 20 70 61 63 65 73 | 2e 20 49 6e 20 70 61 72 |ts paces|. In par|
|00000110| 74 69 63 75 6c 61 72 2c | 20 69 66 20 74 68 65 20 |ticular,| if the |
|00000120| 61 72 72 61 79 20 61 5b | 5d 0d 64 69 64 6e 27 74 |array a[|].didn't|
|00000130| 20 63 68 61 6e 67 65 20 | 64 69 6d 65 6e 73 69 6f | change |dimensio|
|00000140| 6e 73 20 66 72 6f 6d 20 | 62 6c 6f 63 6b 20 74 6f |ns from |block to|
|00000150| 20 62 6c 6f 63 6b 20 69 | 6e 20 74 65 73 74 41 73 | block i|n testAs|
|00000160| 73 69 67 6e 31 20 74 68 | 65 6e 20 77 65 20 63 6f |sign1 th|en we co|
|00000170| 75 6c 64 0d 72 65 61 64 | 20 74 68 65 20 77 68 6f |uld.read| the who|
|00000180| 6c 65 20 66 69 6c 65 20 | 62 79 20 61 20 73 69 6e |le file |by a sin|
|00000190| 67 6c 65 20 63 61 6c 6c | 20 74 6f 20 52 65 61 64 |gle call| to Read|
|000001a0| 41 73 73 69 67 6e 6d 65 | 6e 74 46 69 6c 65 2c 20 |Assignme|ntFile, |
|000001b0| 69 6e 73 74 65 61 64 20 | 6f 66 0d 6f 70 65 6e 69 |instead |of.openi|
|000001c0| 6e 67 20 74 68 65 20 66 | 69 6c 65 20 61 6e 64 20 |ng the f|ile and |
|000001d0| 6d 61 6b 69 6e 67 20 72 | 65 70 65 61 74 65 64 20 |making r|epeated |
|000001e0| 63 61 6c 6c 73 20 74 6f | 20 52 65 61 64 41 73 73 |calls to| ReadAss|
|000001f0| 69 67 6e 6d 65 6e 74 42 | 6c 6f 63 6b 2c 20 65 74 |ignmentB|lock, et|
|00000200| 63 2e 0d 0d 46 6f 72 20 | 61 20 67 6f 6f 64 20 65 |c...For |a good e|
|00000210| 78 61 6d 70 6c 65 20 6f | 66 20 74 68 65 20 75 73 |xample o|f the us|
|00000220| 65 20 6f 66 20 41 73 73 | 69 67 6e 2c 20 73 65 65 |e of Ass|ign, see|
|00000230| 20 52 65 61 64 4c 75 6d | 69 6e 61 6e 63 65 52 65 | ReadLum|inanceRe|
|00000240| 63 6f 72 64 2e 63 2e 0d | 0d 48 49 53 54 4f 52 59 |cord.c..|.HISTORY|
|00000250| 3a 0d 38 2f 39 33 09 64 | 67 70 09 63 72 65 61 74 |:.8/93.d|gp.creat|
|00000260| 65 64 20 74 68 69 73 20 | 6e 65 77 20 76 65 72 73 |ed this |new vers|
|00000270| 69 6f 6e 2c 20 77 68 69 | 63 68 20 63 6f 62 62 6c |ion, whi|ch cobbl|
|00000280| 65 73 20 74 6f 67 65 74 | 68 65 72 20 73 65 76 65 |es toget|her seve|
|00000290| 72 61 6c 20 6f 6c 64 65 | 72 20 76 65 72 73 69 6f |ral olde|r versio|
|000002a0| 6e 73 2e 0d 38 2f 31 32 | 2f 39 33 09 64 67 70 09 |ns..8/12|/93.dgp.|
|000002b0| 75 70 64 61 74 65 64 20 | 74 6f 20 77 6f 72 6b 20 |updated |to work |
|000002c0| 77 69 74 68 20 6e 65 77 | 20 41 73 73 69 67 6e 2e |with new| Assign.|
|000002d0| 63 0d 39 2f 38 2f 39 33 | 09 64 67 70 09 63 61 6c |c.9/8/93|.dgp.cal|
|000002e0| 6c 20 52 65 71 75 69 72 | 65 28 29 20 61 6e 64 20 |l Requir|e() and |
|000002f0| 75 73 65 20 6e 65 77 20 | 41 6c 6c 6f 63 61 74 65 |use new |Allocate|
|00000300| 44 65 73 63 72 69 70 74 | 69 6f 6e 73 2e 0d 39 2f |Descript|ions..9/|
|00000310| 35 2f 39 34 20 64 67 70 | 20 72 65 6d 6f 76 65 64 |5/94 dgp| removed|
|00000320| 20 61 73 73 75 6d 70 74 | 69 6f 6e 20 69 6e 20 70 | assumpt|ion in p|
|00000330| 72 69 6e 74 66 27 73 20 | 74 68 61 74 20 69 6e 74 |rintf's |that int|
|00000340| 3d 3d 73 68 6f 72 74 2e | 0d 2a 2f 0d 23 69 6e 63 |==short.|.*/.#inc|
|00000350| 6c 75 64 65 20 22 56 69 | 64 65 6f 54 6f 6f 6c 62 |lude "Vi|deoToolb|
|00000360| 6f 78 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ox.h".#i|nclude <|
|00000370| 61 73 73 65 72 74 2e 68 | 3e 0d 23 69 66 20 4d 41 |assert.h|>.#if MA|
|00000380| 43 5f 43 0d 09 23 69 6e | 63 6c 75 64 65 20 22 4c |C_C..#in|clude "L|
|00000390| 75 6d 69 6e 61 6e 63 65 | 2e 68 22 0d 23 65 6e 64 |uminance|.h".#end|
|000003a0| 69 66 0d 23 64 65 66 69 | 6e 65 20 50 52 45 46 45 |if.#defi|ne PREFE|
|000003b0| 52 45 4e 43 45 53 5f 46 | 4f 4c 44 45 52 20 30 0d |RENCES_F|OLDER 0.|
|000003c0| 76 6f 69 64 20 6d 6f 72 | 65 54 65 73 74 73 28 76 |void mor|eTests(v|
|000003d0| 6f 69 64 29 3b 0d 76 6f | 69 64 20 6d 61 69 6e 28 |oid);.vo|id main(|
|000003e0| 76 6f 69 64 29 3b 0d 0d | 74 79 70 65 64 65 66 20 |void);..|typedef |
|000003f0| 73 74 72 75 63 74 20 7b | 0d 09 64 6f 75 62 6c 65 |struct {|..double|
|00000400| 20 2a 61 2c 6c 6f 67 43 | 2c 76 69 65 77 69 6e 67 | *a,logC|,viewing|
|00000410| 44 69 73 74 61 6e 63 65 | 3b 0d 09 6c 6f 6e 67 20 |Distance|;..long |
|00000420| 74 72 69 61 6c 73 3b 0d | 09 63 68 61 72 20 2a 6d |trials;.|.char *m|
|00000430| 65 73 73 61 67 65 3b 0d | 09 75 6e 73 69 67 6e 65 |essage;.|.unsigne|
|00000440| 64 20 63 68 61 72 20 2a | 6d 3b 0d 7d 20 50 73 79 |d char *|m;.} Psy|
|00000450| 63 68 6f 70 68 79 73 69 | 63 73 3b 0d 44 65 73 63 |chophysi|cs;.Desc|
|00000460| 72 69 70 74 69 6f 6e 20 | 2a 44 65 73 63 72 69 62 |ription |*Describ|
|00000470| 65 50 73 79 63 68 6f 70 | 68 79 73 69 63 73 28 50 |ePsychop|hysics(P|
|00000480| 73 79 63 68 6f 70 68 79 | 73 69 63 73 20 2a 70 29 |sychophy|sics *p)|
|00000490| 3b 0d 0d 44 65 73 63 72 | 69 70 74 69 6f 6e 20 2a |;..Descr|iption *|
|000004a0| 44 65 73 63 72 69 62 65 | 50 73 79 63 68 6f 70 68 |Describe|Psychoph|
|000004b0| 79 73 69 63 73 28 50 73 | 79 63 68 6f 70 68 79 73 |ysics(Ps|ychophys|
|000004c0| 69 63 73 20 2a 70 29 0d | 7b 0d 09 44 65 73 63 72 |ics *p).|{..Descr|
|000004d0| 69 70 74 69 6f 6e 20 2a | 64 3b 0d 09 69 6e 74 20 |iption *|d;..int |
|000004e0| 69 3b 0d 09 0d 09 64 3d | 41 6c 6c 6f 63 61 74 65 |i;....d=|Allocate|
|000004f0| 44 65 73 63 72 69 70 74 | 69 6f 6e 73 28 31 30 29 |Descript|ions(10)|
|00000500| 3b 0d 09 69 3d 30 3b 0d | 09 64 5b 69 2b 2b 5d 3d |;..i=0;.|.d[i++]=|
|00000510| 44 65 73 63 72 69 62 65 | 28 73 74 72 69 6e 67 54 |Describe|(stringT|
|00000520| 79 70 65 2c 26 70 2d 3e | 6d 65 73 73 61 67 65 2c |ype,&p->|message,|
|00000530| 22 6d 65 73 73 61 67 65 | 22 2c 4e 55 4c 4c 29 3b |"message|",NULL);|
|00000540| 0d 09 64 5b 69 2b 2b 5d | 3d 44 65 73 63 72 69 62 |..d[i++]|=Describ|
|00000550| 65 28 64 6f 75 62 6c 65 | 54 79 70 65 2c 26 70 2d |e(double|Type,&p-|
|00000560| 3e 76 69 65 77 69 6e 67 | 44 69 73 74 61 6e 63 65 |>viewing|Distance|
|00000570| 2c 22 76 69 65 77 69 6e | 67 44 69 73 74 61 6e 63 |,"viewin|gDistanc|
|00000580| 65 22 2c 4e 55 4c 4c 29 | 3b 0d 09 64 5b 69 2b 2b |e",NULL)|;..d[i++|
|00000590| 5d 3d 44 65 73 63 72 69 | 62 65 28 73 68 6f 72 74 |]=Descri|be(short|
|000005a0| 54 79 70 65 2c 26 70 2d | 3e 74 72 69 61 6c 73 2c |Type,&p-|>trials,|
|000005b0| 22 74 72 69 61 6c 73 22 | 2c 4e 55 4c 4c 29 3b 0d |"trials"|,NULL);.|
|000005c0| 09 64 5b 69 2b 2b 5d 3d | 44 65 73 63 72 69 62 65 |.d[i++]=|Describe|
|000005d0| 28 64 6f 75 62 6c 65 54 | 79 70 65 2c 26 70 2d 3e |(doubleT|ype,&p->|
|000005e0| 6c 6f 67 43 2c 22 6c 6f | 67 43 22 2c 4e 55 4c 4c |logC,"lo|gC",NULL|
|000005f0| 29 3b 0d 09 64 5b 69 2b | 2b 5d 3d 44 65 73 63 72 |);..d[i+|+]=Descr|
|00000600| 69 62 65 28 75 6e 73 69 | 67 6e 65 64 43 68 61 72 |ibe(unsi|gnedChar|
|00000610| 50 74 72 54 79 70 65 2c | 26 70 2d 3e 6d 2c 22 6d |PtrType,|&p->m,"m|
|00000620| 22 2c 4e 55 4c 4c 29 3b | 0d 09 64 5b 69 2b 2b 5d |",NULL);|..d[i++]|
|00000630| 3d 44 65 73 63 72 69 62 | 65 28 64 6f 75 62 6c 65 |=Describ|e(double|
|00000640| 50 74 72 54 79 70 65 2c | 26 70 2d 3e 61 2c 22 61 |PtrType,|&p->a,"a|
|00000650| 22 2c 4e 55 4c 4c 29 3b | 0d 09 61 73 73 65 72 74 |",NULL);|..assert|
|00000660| 28 69 3c 3d 31 30 29 3b | 09 09 2f 2a 20 20 6d 61 |(i<=10);|../* ma|
|00000670| 6b 65 20 73 75 72 65 20 | 61 72 72 61 79 20 77 61 |ke sure |array wa|
|00000680| 73 20 62 69 67 20 65 6e | 6f 75 67 68 20 2a 2f 0d |s big en|ough */.|
|00000690| 09 64 5b 69 2b 2b 5d 3d | 4e 75 6c 6c 44 65 73 63 |.d[i++]=|NullDesc|
|000006a0| 72 69 70 74 69 6f 6e 28 | 29 3b 09 09 2f 2a 20 20 |ription(|);../* |
|000006b0| 6d 61 72 6b 20 65 6e 64 | 20 6f 66 20 61 72 72 61 |mark end| of arra|
|000006c0| 79 20 2a 2f 0d 09 72 65 | 74 75 72 6e 20 64 3b 0d |y */..re|turn d;.|
|000006d0| 7d 0d 0d 76 6f 69 64 20 | 6d 61 69 6e 28 76 6f 69 |}..void |main(voi|
|000006e0| 64 29 0d 7b 0d 09 44 65 | 73 63 72 69 70 74 69 6f |d).{..De|scriptio|
|000006f0| 6e 20 2a 64 3b 0d 09 73 | 74 61 74 69 63 20 50 73 |n *d;..s|tatic Ps|
|00000700| 79 63 68 6f 70 68 79 73 | 69 63 73 20 70 73 79 63 |ychophys|ics psyc|
|00000710| 68 6f 70 68 79 73 69 63 | 73 2c 2a 70 3b 0d 09 73 |hophysic|s,*p;..s|
|00000720| 68 6f 72 74 20 69 2c 6a | 2c 66 6c 61 67 73 3d 61 |hort i,j|,flags=a|
|00000730| 73 73 69 67 6e 52 65 70 | 6f 72 74 55 6e 6b 6e 6f |ssignRep|ortUnkno|
|00000740| 77 6e 3b 0d 09 46 49 4c | 45 20 2a 73 74 72 65 61 |wn;..FIL|E *strea|
|00000750| 6d 3b 0d 09 63 68 61 72 | 20 66 69 6c 65 6e 61 6d |m;..char| filenam|
|00000760| 65 5b 5d 3d 22 74 65 73 | 74 41 73 73 69 67 6e 31 |e[]="tes|tAssign1|
|00000770| 22 3b 0d 09 0d 09 52 65 | 71 75 69 72 65 28 30 29 |";....Re|quire(0)|
|00000780| 3b 0d 09 70 3d 26 70 73 | 79 63 68 6f 70 68 79 73 |;..p=&ps|ychophys|
|00000790| 69 63 73 3b 0d 09 64 3d | 44 65 73 63 72 69 62 65 |ics;..d=|Describe|
|000007a0| 50 73 79 63 68 6f 70 68 | 79 73 69 63 73 28 70 29 |Psychoph|ysics(p)|
|000007b0| 3b 0d 09 49 6e 69 74 69 | 61 6c 69 7a 65 44 65 73 |;..Initi|alizeDes|
|000007c0| 63 72 69 62 65 64 56 61 | 72 73 28 64 2c 66 6c 61 |cribedVa|rs(d,fla|
|000007d0| 67 73 29 3b 0d 09 73 74 | 72 65 61 6d 3d 66 6f 70 |gs);..st|ream=fop|
|000007e0| 65 6e 28 66 69 6c 65 6e | 61 6d 65 2c 22 72 22 29 |en(filen|ame,"r")|
|000007f0| 3b 0d 09 64 6f 7b 0d 09 | 09 70 72 69 6e 74 66 28 |;..do{..|.printf(|
|00000800| 22 5c 6e 2f 2a 2a 2a 2a | 2a 2a 2a 2a 20 4e 65 77 |"\n/****|**** New|
|00000810| 20 62 6c 6f 63 6b 20 2a | 2a 2a 2a 2a 2a 2a 2a 2f | block *|*******/|
|00000820| 5c 6e 22 29 3b 0d 09 09 | 52 65 61 64 41 73 73 69 |\n");...|ReadAssi|
|00000830| 67 6e 6d 65 6e 74 42 6c | 6f 63 6b 28 73 74 72 65 |gnmentBl|ock(stre|
|00000840| 61 6d 2c 64 2c 66 6c 61 | 67 73 29 3b 0d 09 09 09 |am,d,fla|gs);....|
|00000850| 2f 2a 20 61 20 72 65 61 | 6c 20 70 72 6f 67 72 61 |/* a rea|l progra|
|00000860| 6d 20 77 6f 75 6c 64 20 | 64 6f 20 73 6f 6d 65 74 |m would |do somet|
|00000870| 68 69 6e 67 20 75 73 65 | 66 75 6c 20 68 65 72 65 |hing use|ful here|
|00000880| 20 77 69 74 68 20 74 68 | 65 20 64 61 74 61 20 69 | with th|e data i|
|00000890| 6e 20 70 20 2a 2f 0d 09 | 09 09 2f 2a 20 69 6e 73 |n p */..|../* ins|
|000008a0| 74 65 61 64 20 77 65 20 | 66 6f 6f 6c 20 61 72 6f |tead we |fool aro|
|000008b0| 75 6e 64 20 77 69 74 68 | 20 70 72 69 6e 74 20 73 |und with| print s|
|000008c0| 74 61 74 65 6d 65 6e 74 | 73 20 2a 2f 0d 09 09 09 |tatement|s */....|
|000008d0| 50 72 69 6e 74 41 73 73 | 69 67 6e 6d 65 6e 74 73 |PrintAss|ignments|
|000008e0| 28 73 74 64 6f 75 74 2c | 64 2c 66 6c 61 67 73 29 |(stdout,|d,flags)|
|000008f0| 3b 0d 09 09 09 70 72 69 | 6e 74 66 28 22 4e 6f 77 |;....pri|ntf("Now|
|00000900| 20 64 69 6d 65 6e 73 69 | 6f 6e 65 64 20 61 73 20 | dimensi|oned as |
|00000910| 61 22 29 3b 0d 09 09 09 | 66 6f 72 28 69 3d 30 3b |a");....|for(i=0;|
|00000920| 3b 69 2b 2b 29 7b 0d 09 | 09 09 09 6a 3d 46 69 6e |;i++){..|...j=Fin|
|00000930| 64 44 65 73 63 72 69 62 | 65 64 44 69 6d 28 64 2c |dDescrib|edDim(d,|
|00000940| 26 70 2d 3e 61 2c 69 2c | 66 6c 61 67 73 29 3b 0d |&p->a,i,|flags);.|
|00000950| 09 09 09 09 69 66 28 6a | 3c 3d 30 29 62 72 65 61 |....if(j|<=0)brea|
|00000960| 6b 3b 0d 09 09 09 09 70 | 72 69 6e 74 66 28 22 5b |k;.....p|rintf("[|
|00000970| 25 64 5d 22 2c 28 69 6e | 74 29 6a 29 3b 0d 09 09 |%d]",(in|t)j);...|
|00000980| 09 7d 0d 09 09 09 70 72 | 69 6e 74 66 28 22 2e 5c |.}....pr|intf(".\|
|00000990| 6e 22 29 3b 0d 09 09 46 | 72 65 65 44 65 73 63 72 |n");...F|reeDescr|
|000009a0| 69 62 65 64 50 74 72 56 | 61 72 73 28 64 2c 66 6c |ibedPtrV|ars(d,fl|
|000009b0| 61 67 73 29 3b 0d 09 7d | 20 77 68 69 6c 65 28 21 |ags);..}| while(!|
|000009c0| 66 65 6f 66 28 73 74 72 | 65 61 6d 29 29 3b 0d 09 |feof(str|eam));..|
|000009d0| 66 63 6c 6f 73 65 28 73 | 74 72 65 61 6d 29 3b 0d |fclose(s|tream);.|
|000009e0| 09 46 72 65 65 44 65 73 | 63 72 69 62 65 64 56 61 |.FreeDes|cribedVa|
|000009f0| 72 73 28 64 2c 66 6c 61 | 67 73 29 3b 0d 09 46 72 |rs(d,fla|gs);..Fr|
|00000a00| 65 65 44 65 73 63 72 69 | 70 74 69 6f 6e 73 28 64 |eeDescri|ptions(d|
|00000a10| 29 3b 0d 09 69 66 28 30 | 29 6d 6f 72 65 54 65 73 |);..if(0|)moreTes|
|00000a20| 74 73 28 29 3b 0d 7d 0d | 76 6f 69 64 20 6d 6f 72 |ts();.}.|void mor|
|00000a30| 65 54 65 73 74 73 28 76 | 6f 69 64 29 0d 7b 0d 09 |eTests(v|oid).{..|
|00000a40| 73 74 61 74 69 63 20 64 | 6f 75 62 6c 65 20 6c 6f |static d|ouble lo|
|00000a50| 67 43 2c 6d 61 73 6b 4c | 6f 67 43 2c 76 69 65 77 |gC,maskL|ogC,view|
|00000a60| 69 6e 67 44 69 73 74 61 | 6e 63 65 2c 2a 61 2c 63 |ingDista|nce,*a,c|
|00000a70| 6f 6e 64 69 74 69 6f 6e | 4c 6f 67 43 5b 34 5d 2c |ondition|LogC[4],|
|00000a80| 63 6f 6e 64 69 74 69 6f | 6e 4d 61 73 6b 4c 6f 67 |conditio|nMaskLog|
|00000a90| 43 5b 34 5d 3b 0d 09 73 | 68 6f 72 74 20 74 72 69 |C[4];..s|hort tri|
|00000aa0| 61 6c 73 2c 69 2c 66 6c | 61 67 73 3b 0d 09 73 74 |als,i,fl|ags;..st|
|00000ab0| 61 74 69 63 20 63 68 61 | 72 20 2a 6b 69 6e 64 4f |atic cha|r *kindO|
|00000ac0| 66 54 72 69 61 6c 2c 2a | 6d 65 73 73 61 67 65 2c |fTrial,*|message,|
|00000ad0| 69 6d 61 67 65 5b 31 30 | 30 30 5d 3b 0d 09 75 6e |image[10|00];..un|
|00000ae0| 73 69 67 6e 65 64 20 63 | 68 61 72 20 2a 6d 3b 0d |signed c|har *m;.|
|00000af0| 09 44 65 73 63 72 69 70 | 74 69 6f 6e 20 2a 64 3b |.Descrip|tion *d;|
|00000b00| 0d 09 46 49 4c 45 20 2a | 73 74 72 65 61 6d 3b 0d |..FILE *|stream;.|
|00000b10| 09 73 74 61 74 69 63 20 | 63 68 61 72 20 66 69 6c |.static |char fil|
|00000b20| 65 6e 61 6d 65 5b 5d 3d | 22 74 65 73 74 41 73 73 |ename[]=|"testAss|
|00000b30| 69 67 6e 32 22 3b 0d 09 | 69 6e 74 20 65 72 72 6f |ign2";..|int erro|
|00000b40| 72 3b 0d 09 73 74 61 74 | 69 63 20 64 6f 75 62 6c |r;..stat|ic doubl|
|00000b50| 65 20 62 5b 32 5d 5b 32 | 5d 2c 63 5b 31 5d 5b 32 |e b[2][2|],c[1][2|
|00000b60| 5d 5b 33 5d 3b 0d 09 0d | 09 66 6c 61 67 73 3d 61 |][3];...|.flags=a|
|00000b70| 73 73 69 67 6e 52 65 70 | 6f 72 74 55 6e 6b 6e 6f |ssignRep|ortUnkno|
|00000b80| 77 6e 3b 0d 09 0d 09 70 | 72 69 6e 74 66 28 22 5c |wn;....p|rintf("\|
|00000b90| 6e 5c 6e 5c 6e 4d 6f 72 | 65 20 74 65 73 74 73 2e |n\n\nMor|e tests.|
|00000ba0| 5c 6e 22 29 3b 0d 09 23 | 69 66 64 65 66 20 5f 4c |\n");..#|ifdef _L|
|00000bb0| 55 4d 49 4e 41 4e 43 45 | 5f 0d 09 09 69 66 28 31 |UMINANCE|_...if(1|
|00000bc0| 29 7b 0d 09 09 09 73 74 | 61 74 69 63 20 4c 75 6d |){....st|atic Lum|
|00000bd0| 69 6e 61 6e 63 65 52 65 | 63 6f 72 64 20 4c 52 3b |inanceRe|cord LR;|
|00000be0| 0d 09 09 09 0d 09 09 09 | 2f 2f 20 54 65 73 74 20 |........|// Test |
|00000bf0| 52 65 61 64 4c 75 6d 69 | 6e 61 6e 63 65 52 65 63 |ReadLumi|nanceRec|
|00000c00| 6f 72 64 2e 63 0d 09 09 | 09 69 66 28 50 52 45 46 |ord.c...|.if(PREF|
|00000c10| 45 52 45 4e 43 45 53 5f | 46 4f 4c 44 45 52 29 65 |ERENCES_|FOLDER)e|
|00000c20| 72 72 6f 72 3d 4f 70 65 | 6e 50 72 65 66 65 72 65 |rror=Ope|nPrefere|
|00000c30| 6e 63 65 73 46 6f 6c 64 | 65 72 28 29 3b 0d 09 09 |ncesFold|er();...|
|00000c40| 09 69 3d 52 65 61 64 4c | 75 6d 69 6e 61 6e 63 65 |.i=ReadL|uminance|
|00000c50| 52 65 63 6f 72 64 28 22 | 4c 75 6d 69 6e 61 6e 63 |Record("|Luminanc|
|00000c60| 65 52 65 63 6f 72 64 31 | 2e 68 22 2c 26 4c 52 2c |eRecord1|.h",&LR,|
|00000c70| 66 6c 61 67 73 29 3b 0d | 09 09 09 69 66 28 50 52 |flags);.|...if(PR|
|00000c80| 45 46 45 52 45 4e 43 45 | 53 5f 46 4f 4c 44 45 52 |EFERENCE|S_FOLDER|
|00000c90| 29 65 72 72 6f 72 3d 43 | 6c 6f 73 65 50 72 65 66 |)error=C|losePref|
|00000ca0| 65 72 65 6e 63 65 73 46 | 6f 6c 64 65 72 28 29 3b |erencesF|older();|
|00000cb0| 0d 09 09 09 69 66 28 69 | 3c 3d 30 29 50 72 69 6e |....if(i|<=0)Prin|
|00000cc0| 74 66 45 78 69 74 28 22 | 43 6f 75 6c 64 6e 27 74 |tfExit("|Couldn't|
|00000cd0| 20 72 65 61 64 20 4c 75 | 6d 69 6e 61 6e 63 65 52 | read Lu|minanceR|
|00000ce0| 65 63 6f 72 64 2c 20 65 | 72 72 6f 72 20 25 64 2e |ecord, e|rror %d.|
|00000cf0| 5c 6e 22 2c 28 69 6e 74 | 29 69 29 3b 0d 09 09 09 |\n",(int|)i);....|
|00000d00| 69 3d 57 72 69 74 65 4c | 75 6d 69 6e 61 6e 63 65 |i=WriteL|uminance|
|00000d10| 52 65 63 6f 72 64 28 22 | 4c 52 2e 68 22 2c 26 4c |Record("|LR.h",&L|
|00000d20| 52 2c 66 6c 61 67 73 29 | 3b 0d 09 09 09 69 66 28 |R,flags)|;....if(|
|00000d30| 69 3c 3d 30 29 50 72 69 | 6e 74 66 45 78 69 74 28 |i<=0)Pri|ntfExit(|
|00000d40| 22 43 6f 75 6c 64 6e 27 | 74 20 77 72 69 74 65 2f |"Couldn'|t write/|
|00000d50| 76 65 72 69 66 79 20 4c | 75 6d 69 6e 61 6e 63 65 |verify L|uminance|
|00000d60| 52 65 63 6f 72 64 2c 20 | 65 72 72 6f 72 20 25 64 |Record, |error %d|
|00000d70| 2e 5c 6e 22 2c 28 69 6e | 74 29 69 29 3b 0d 09 09 |.\n",(in|t)i);...|
|00000d80| 09 70 72 69 6e 74 66 28 | 22 52 65 61 64 4c 75 6d |.printf(|"ReadLum|
|00000d90| 69 6e 61 6e 63 65 52 65 | 63 6f 72 64 2e 63 20 73 |inanceRe|cord.c s|
|00000da0| 65 65 6d 73 20 74 6f 20 | 77 6f 72 6b 20 66 69 6e |eems to |work fin|
|00000db0| 65 2e 20 43 72 65 61 74 | 65 64 20 4c 52 2e 68 5c |e. Creat|ed LR.h\|
|00000dc0| 6e 5c 6e 22 29 3b 0d 09 | 09 7d 0d 09 23 65 6e 64 |n\n");..|.}..#end|
|00000dd0| 69 66 0d 09 23 69 66 20 | 31 0d 09 09 2f 2a 20 70 |if..#if |1.../* p|
|00000de0| 61 72 73 65 20 74 65 73 | 74 41 73 73 69 67 6e 32 |arse tes|tAssign2|
|00000df0| 20 2a 2f 0d 09 09 64 3d | 41 6c 6c 6f 63 61 74 65 | */...d=|Allocate|
|00000e00| 44 65 73 63 72 69 70 74 | 69 6f 6e 73 28 31 34 29 |Descript|ions(14)|
|00000e10| 3b 0d 09 09 69 3d 30 3b | 0d 09 09 64 5b 69 2b 2b |;...i=0;|...d[i++|
|00000e20| 5d 3d 44 65 73 63 72 69 | 62 65 28 64 6f 75 62 6c |]=Descri|be(doubl|
|00000e30| 65 50 74 72 54 79 70 65 | 2c 26 61 2c 22 61 22 2c |ePtrType|,&a,"a",|
|00000e40| 22 61 72 72 61 79 22 29 | 3b 0d 09 09 64 5b 69 2b |"array")|;...d[i+|
|00000e50| 2b 5d 3d 44 65 73 63 72 | 69 62 65 28 75 6e 73 69 |+]=Descr|ibe(unsi|
|00000e60| 67 6e 65 64 43 68 61 72 | 50 74 72 54 79 70 65 2c |gnedChar|PtrType,|
|00000e70| 26 6d 2c 22 6d 22 2c 22 | 63 68 61 72 73 22 29 3b |&m,"m","|chars");|
|00000e80| 0d 09 09 64 5b 69 2b 2b | 5d 3d 44 65 73 63 72 69 |...d[i++|]=Descri|
|00000e90| 62 65 41 72 72 61 79 28 | 63 68 61 72 54 79 70 65 |beArray(|charType|
|00000ea0| 2c 26 69 6d 61 67 65 2c | 22 69 6d 61 67 65 22 2c |,&image,|"image",|
|00000eb0| 22 49 6d 61 67 65 20 64 | 61 74 61 22 2c 31 30 30 |"Image d|ata",100|
|00000ec0| 4c 2c 30 4c 29 3b 0d 09 | 09 64 5b 69 2b 2b 5d 3d |L,0L);..|.d[i++]=|
|00000ed0| 44 65 73 63 72 69 62 65 | 28 73 74 72 69 6e 67 54 |Describe|(stringT|
|00000ee0| 79 70 65 2c 26 6d 65 73 | 73 61 67 65 2c 22 6d 65 |ype,&mes|sage,"me|
|00000ef0| 73 73 61 67 65 22 2c 4e | 55 4c 4c 29 3b 0d 09 09 |ssage",N|ULL);...|
|00000f00| 64 5b 69 2b 2b 5d 3d 44 | 65 73 63 72 69 62 65 28 |d[i++]=D|escribe(|
|00000f10| 64 6f 75 62 6c 65 54 79 | 70 65 2c 26 6c 6f 67 43 |doubleTy|pe,&logC|
|00000f20| 2c 22 6c 6f 67 43 22 2c | 22 6c 6f 67 20 63 6f 6e |,"logC",|"log con|
|00000f30| 74 72 61 73 74 22 29 3b | 0d 09 09 64 5b 69 2b 2b |trast");|...d[i++|
|00000f40| 5d 3d 44 65 73 63 72 69 | 62 65 28 64 6f 75 62 6c |]=Descri|be(doubl|
|00000f50| 65 54 79 70 65 2c 26 6d | 61 73 6b 4c 6f 67 43 2c |eType,&m|askLogC,|
|00000f60| 22 6d 61 73 6b 4c 6f 67 | 43 22 2c 4e 55 4c 4c 29 |"maskLog|C",NULL)|
|00000f70| 3b 0d 09 09 64 5b 69 2b | 2b 5d 3d 44 65 73 63 72 |;...d[i+|+]=Descr|
|00000f80| 69 62 65 28 73 74 72 69 | 6e 67 54 79 70 65 2c 26 |ibe(stri|ngType,&|
|00000f90| 6b 69 6e 64 4f 66 54 72 | 69 61 6c 2c 22 6b 69 6e |kindOfTr|ial,"kin|
|00000fa0| 64 4f 66 54 72 69 61 6c | 22 2c 4e 55 4c 4c 29 3b |dOfTrial|",NULL);|
|00000fb0| 0d 09 09 64 5b 69 2b 2b | 5d 3d 44 65 73 63 72 69 |...d[i++|]=Descri|
|00000fc0| 62 65 28 64 6f 75 62 6c | 65 54 79 70 65 2c 26 76 |be(doubl|eType,&v|
|00000fd0| 69 65 77 69 6e 67 44 69 | 73 74 61 6e 63 65 2c 22 |iewingDi|stance,"|
|00000fe0| 76 69 65 77 69 6e 67 44 | 69 73 74 61 6e 63 65 22 |viewingD|istance"|
|00000ff0| 2c 22 69 6e 63 68 65 73 | 22 29 3b 0d 09 09 64 5b |,"inches|");...d[|
|00001000| 69 2b 2b 5d 3d 44 65 73 | 63 72 69 62 65 28 73 68 |i++]=Des|cribe(sh|
|00001010| 6f 72 74 54 79 70 65 2c | 26 74 72 69 61 6c 73 2c |ortType,|&trials,|
|00001020| 22 74 72 69 61 6c 73 22 | 2c 4e 55 4c 4c 29 3b 0d |"trials"|,NULL);.|
|00001030| 09 09 64 5b 69 2b 2b 5d | 3d 44 65 73 63 72 69 62 |..d[i++]|=Describ|
|00001040| 65 41 72 72 61 79 28 64 | 6f 75 62 6c 65 54 79 70 |eArray(d|oubleTyp|
|00001050| 65 2c 26 62 2c 22 62 22 | 2c 4e 55 4c 4c 2c 32 4c |e,&b,"b"|,NULL,2L|
|00001060| 2c 32 4c 2c 30 4c 29 3b | 0d 09 09 64 5b 69 2b 2b |,2L,0L);|...d[i++|
|00001070| 5d 3d 44 65 73 63 72 69 | 62 65 41 72 72 61 79 28 |]=Descri|beArray(|
|00001080| 64 6f 75 62 6c 65 54 79 | 70 65 2c 26 63 2c 22 63 |doubleTy|pe,&c,"c|
|00001090| 22 2c 4e 55 4c 4c 2c 31 | 4c 2c 32 4c 2c 33 4c 2c |",NULL,1|L,2L,3L,|
|000010a0| 30 4c 29 3b 0d 09 09 61 | 73 73 65 72 74 28 69 3c |0L);...a|ssert(i<|
|000010b0| 3d 31 34 29 3b 09 09 09 | 09 09 09 09 09 2f 2a 20 |=14);...|...../* |
|000010c0| 6d 61 6b 65 20 73 75 72 | 65 20 61 72 72 61 79 20 |make sur|e array |
|000010d0| 77 61 73 20 62 69 67 20 | 65 6e 6f 75 67 68 20 2a |was big |enough *|
|000010e0| 2f 0d 09 09 64 5b 69 2b | 2b 5d 3d 4e 75 6c 6c 44 |/...d[i+|+]=NullD|
|000010f0| 65 73 63 72 69 70 74 69 | 6f 6e 28 29 3b 09 09 09 |escripti|on();...|
|00001100| 09 09 2f 2a 20 6d 61 72 | 6b 20 65 6e 64 20 6f 66 |../* mar|k end of|
|00001110| 20 61 72 72 61 79 20 2a | 2f 0d 09 09 49 6e 69 74 | array *|/...Init|
|00001120| 69 61 6c 69 7a 65 44 65 | 73 63 72 69 62 65 64 56 |ializeDe|scribedV|
|00001130| 61 72 73 28 64 2c 30 29 | 3b 0d 09 09 73 74 72 65 |ars(d,0)|;...stre|
|00001140| 61 6d 3d 66 6f 70 65 6e | 28 66 69 6c 65 6e 61 6d |am=fopen|(filenam|
|00001150| 65 2c 22 72 22 29 3b 0d | 09 09 52 65 61 64 41 73 |e,"r");.|..ReadAs|
|00001160| 73 69 67 6e 6d 65 6e 74 | 4c 69 6e 65 28 73 74 72 |signment|Line(str|
|00001170| 65 61 6d 2c 64 0d 09 09 | 09 2c 61 73 73 69 67 6e |eam,d...|.,assign|
|00001180| 48 65 78 46 6c 6f 61 74 | 73 7c 61 73 73 69 67 6e |HexFloat|s|assign|
|00001190| 52 65 70 6f 72 74 55 6e | 6b 6e 6f 77 6e 7c 61 73 |ReportUn|known|as|
|000011a0| 73 69 67 6e 45 63 68 6f | 41 73 73 69 67 6e 6d 65 |signEcho|Assignme|
|000011b0| 6e 74 73 29 3b 0d 09 09 | 46 72 65 65 44 65 73 63 |nts);...|FreeDesc|
|000011c0| 72 69 62 65 64 56 61 72 | 73 28 64 2c 30 29 3b 0d |ribedVar|s(d,0);.|
|000011d0| 09 09 66 63 6c 6f 73 65 | 28 73 74 72 65 61 6d 29 |..fclose|(stream)|
|000011e0| 3b 0d 09 09 52 65 61 64 | 41 73 73 69 67 6e 6d 65 |;...Read|Assignme|
|000011f0| 6e 74 46 69 6c 65 28 66 | 69 6c 65 6e 61 6d 65 2c |ntFile(f|ilename,|
|00001200| 64 2c 61 73 73 69 67 6e | 48 65 78 46 6c 6f 61 74 |d,assign|HexFloat|
|00001210| 73 7c 61 73 73 69 67 6e | 52 65 70 6f 72 74 55 6e |s|assign|ReportUn|
|00001220| 6b 6e 6f 77 6e 29 3b 0d | 09 09 50 72 69 6e 74 41 |known);.|..PrintA|
|00001230| 73 73 69 67 6e 6d 65 6e | 74 73 28 73 74 64 6f 75 |ssignmen|ts(stdou|
|00001240| 74 2c 64 2c 30 29 3b 0d | 09 09 46 72 65 65 44 65 |t,d,0);.|..FreeDe|
|00001250| 73 63 72 69 70 74 69 6f | 6e 73 28 64 29 3b 0d 09 |scriptio|ns(d);..|
|00001260| 23 65 6e 64 69 66 0d 7d | 0d 00 00 00 00 00 00 00 |#endif.}|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 01 00 00 00 01 90 | 00 00 00 90 00 00 00 3e |........|.......>|
|00001290| 00 48 e7 01 08 28 6e 00 | 08 2f 2e 00 0c 2f 0c 4e |.H...(n.|./.../.N|
|000012a0| ba 00 a0 2e 00 70 fc b0 | 87 66 04 70 00 60 0a 20 |.....p..|.f.p.`. |
|000012b0| 0c 54 65 73 74 41 73 73 | 69 67 6e 2e 63 ec 02 00 |.TestAss|ign.c...|
|000012c0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000012d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 ab bf ee 30 00 00 | 00 00 00 00 01 ce 00 48 |.....0..|.......H|
|00001300| 6e ff f4 4e ad 04 f2 26 | 40 20 0b 58 8f 66 d4 20 |n..N...&|@ .X.f. |
|00001310| 54 70 00 20 80 4c ee 18 | 00 ff ec 4e 5e 4e 75 4e |Tp. .L..|...N^NuN|
|00001320| 56 00 00 2f 0c 28 6e 00 | 08 2f 0c 4e ba ff 98 70 |V../.(n.|./.N...p|
|00001330| 00 2f 00 2f 0c 4e ba fe | 6e 28 6e ff fc 4e 5e 4e |././.N..|n(n..N^N|
|00001340| 75 4e 56 ff f4 48 e7 01 | 08 2e 2e 00 0c 2f 2e 00 |uNV..H..|...../..|
|00001350| 08 48 6e ff f4 4e ad 04 | e2 41 ee ff f4 50 8f 60 |.Hn..N..|.A...P.`|
|00001360| 18 2f 0c 20 54 20 50 22 | 68 00 1c 4e 91 be 80 58 |./. T P"|h..N...X|
|00001370| 8f 66 06 20 2e ff f8 60 | 12 48 6e ff f4 4e ad 04 |.f. ...`|.Hn..N..|
|00001380| 00 00 00 40 00 03 00 00 | 04 20 00 00 04 35 15 44 |...@....|. ...5.D|
|00001390| 65 73 63 72 69 62 65 50 | 73 79 63 68 6f 70 68 79 |escribeP|sychophy|
|000013a0| 73 69 63 73 00 00 06 58 | 00 00 06 5c 05 6d 61 69 |sics...X|...\.mai|
|000013b0| 6e 00 00 00 09 ad 00 00 | 09 b6 09 6d 6f 72 65 54 |n.......|...moreT|
|000013c0| 65 73 74 73 00 00 00 48 | 00 09 4d 6f 6e 61 63 6f |ests...H|..Monaco|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 03 00 04 00 41 |........|.......A|
|000013f0| 00 09 01 8c 02 7c 00 41 | 00 09 01 8c 02 7c aa c8 |.....|.A|.....|..|
|00001400| 35 5e 00 00 0b 4d 00 00 | 0b 5c 00 00 0b 43 01 00 |5^...M..|.\...C..|
|00001410| 00 00 01 00 00 00 01 90 | 00 00 00 90 00 00 00 3e |........|.......>|
|00001420| 00 cf ce a4 1a d0 00 00 | 00 1c 00 3e 00 00 4d 50 |........|...>..MP|
|00001430| 53 52 00 01 00 0a 03 ef | ff ff 00 00 00 00 00 00 |SR......|........|
|00001440| 00 00 03 ed ff ff 00 00 | 00 44 00 00 00 00 00 00 |........|.D......|
|00001450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+